package edu.scu.declaresys.service.intr;

import edu.scu.declaresys.exception.ExecuteException;
import edu.scu.declaresys.util.PageList;
import edu.scu.declaresys.vo.Project;

/**
 * 
 * @author: zt
 * @since : 2013-7-9
 */
public interface IProjectService
{
	//
	// 通用
	//
	public Project findById(Integer id, int depth) throws ExecuteException;
	
	public void update(Project project) throws ExecuteException;
	
	public Integer addProject(Project project) throws ExecuteException;
	
	//
	// 项目申报接口
	//
//	public Project saveDraft(Project project) throws ExecuteException;
//	
//	public void deleteDraft(Integer id) throws ExecuteException;

	
	
	//
	// 项目项目申报
	//
	public PageList<Project> getMyCommittedProject(Integer userId, Integer projectClassId, Integer state, String projectName,
			Integer page, String orderColumn, Boolean isAsc) 
	throws ExecuteException;

	public Project findByNameUnique(String name) throws ExecuteException;

	//
	// 项目推荐接口
	//
	public PageList<Project> findWaitRcmdProjectList(Integer rcmdUserId, int level, Integer projectClassId,
			Integer year, String projectName, Integer page)
	throws ExecuteException;

	PageList<Project> findRcmdedProjectList(Integer rcmdUserId, Integer level, 
			Integer projectClassId, Integer year,Integer state, String projectName,
			Integer page) 
	throws ExecuteException;

	/**
	 * 查找当前推荐人员需要处理的下级请求取消推荐的项目
	 *@param rcmdUserId
	 *@param level
	 *@param projectClassId
	 *@param year
	 *@param name
	 *@param page
	 *@return
	 * @throws ExecuteException 
	 */
	public PageList<Project> findCancelRcmdProject(Integer rcmdUserId, Integer level, Integer projectClassId, Integer year,
			String name, Integer page) 
	throws ExecuteException;

	//
	// 项目审批接口
	//
	public PageList<Project> findWaitAuditProject(Integer projectClassId, Integer year, String name, Integer page)
	throws ExecuteException;

	public PageList<Project> findAudittedProject(Integer projectClassId, Integer year, String name, Integer page)
	throws ExecuteException;

	public PageList<Project> findRequestModifyProject(Integer projectClassId, Integer year, String name, Integer page)
	throws ExecuteException;

	//
	// 项目检索
	//
	PageList<Project> searchProject(Project project, Integer page) throws ExecuteException;

	//
	//
	//
	public boolean hasProjectInArea(Integer id) throws ExecuteException;

	
	
}
